home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / SNNI.CMD < prev    next >
Encoding:
Text File  |  1996-02-28  |  3.2 KB  |  159 lines

  1. #    Login.cmd for Snni/Exocom
  2. #
  3. #   1) You must use RTS/CTS 
  4. #         (also known as Hardware Flow Control or Hardware Handshaking)
  5. #   2) You must disable XON/OFF (Software Flow Control)
  6. #   3) For external modems:  You must use a complete modem cable 
  7. #         ie:   Pins 1,2,3,4,5,6,7,8 and 20 must be connected
  8. #
  9. # For additional information:
  10. #  Email info@snni.net
  11. #   or contact SNNI technical support: (714) 991-1919
  12. #**************************************************************************
  13. #
  14. # replace echo off with echo on to examine connection difficulties
  15. echo off
  16. #
  17. #
  18. %attempts = 20
  19. display \n
  20. #
  21. #
  22. if ![load $modemDefault]
  23.   $modemDefault = "AT&F"
  24.   save $modemDefault
  25. end
  26. #
  27. if ![load $modemSetup]
  28.   $modemSetup = "AT&C1&D2"
  29.   save $modemSetup
  30. end
  31. if ![load $modemDialCmd]
  32.   $modemDialCmd = "ATDT"
  33.   save $modemDialCmd
  34. end
  35. #
  36. if ![load $number]
  37.   display \7
  38.   if [query $number "Enter SNNI Phone Number:"]
  39.     if $number <> "Q"
  40.       save $number
  41.     end
  42.   end
  43. end
  44. #
  45. if ![load $username]
  46.   display \7
  47.   if [username "Enter Your SNNI Username:"]
  48.     if $username <> "Q"
  49.        $username = lower($username)
  50.        save $username
  51.     end
  52.   end
  53. end
  54. #
  55. if ![load $keepPassword]
  56.   display \7
  57.   if [query $keepPassword "Should I Remember Your Login Password? (Y or N)"]
  58.     if $keepPassword <> "Q"
  59.       if $keepPassword = "Yes"
  60.         $keepPassword = "Y"
  61.       end
  62.       save $keepPassword
  63.     end
  64.   end
  65. end
  66. #
  67. if $keepPassword = "Y"
  68.   if ![load $password]
  69.     display \7
  70.     if [password "Enter Your Login password:"]
  71.       if $password <> "Q"
  72.         save $password
  73.       end
  74.     end
  75.   end
  76. else
  77.   $password = ""
  78.   save $password
  79.   password "Enter Your Login Password:"
  80. end
  81. #
  82. #
  83. $userprompt = "login:"
  84. $passprompt = "password:"
  85. $addrtag = ") to "
  86. #
  87. #
  88. display \nThanks for choosing SNNI Internet Services!
  89. # reset modem
  90. set dtr off
  91. sleep 3
  92. set dtr on
  93. #
  94. display \nPress Esc to abort.
  95. display \n\nSetting Modem to Factory Defaults:  
  96. output $modemDefault\13
  97. if ! [input 10 OK\n]
  98.   display \n  *** Modem is not responding.  Examine your modem.
  99.   display \n  Examine modem port and speed settings (choose File | Setup).
  100.   display \n  Unable to establish connection.
  101.   abort
  102. else
  103.   display OK
  104. end
  105. #
  106. # Initialize modem
  107. #
  108. display \nInitializing Modem:  
  109. output $modemSetup\13
  110. if ! [input 10 OK\n]
  111.   display \n*** Modem initialization string $modemSetup failed.
  112.   display \n  Please examine your modem initialization command string.
  113.   display \n  Choose login | modem.cmd to correct.
  114.   display \n  Unable to establish connection.
  115.   abort
  116. else
  117.   display OK
  118. end
  119. #
  120. # Dial
  121. #
  122. echo on
  123. %n = 0
  124. repeat
  125.   if %n = %attempts
  126.     display \nRedial count exceeded.\n
  127.     abort
  128.   end
  129.   if %n = 0
  130.      display \nDialing SNNI Internet Services!  
  131.   end
  132.   if %n > 0
  133.      display \n\nRedialing SNNI Internet Services  
  134.   end
  135.   output $modemDialCmd $number\13
  136.   %ok = [input 55 CONNECT]
  137.   %n = %n + 1
  138. until %ok
  139.  
  140. echo off
  141. #Poke the Term Server
  142. output \13
  143.  
  144. display \nSending user ID info to SNNI\n
  145. input 40 $userprompt
  146. output P$username\13
  147. input 40 $passprompt
  148. output $password\13
  149.  
  150. #
  151. #
  152. display \nInitializing PPP Protocal\n
  153.  
  154. sleep 3
  155.  
  156. display \nReady to run Internet Applications. \n
  157. online
  158.